package com.sailfish.springbootdemo.service.db1;

import com.sailfish.springbootdemo.pojo.Result;
import com.sailfish.springbootdemo.pojo.db1.PcbaDeviceParam;
import com.sailfish.springbootdemo.pojo.db1.TechDeviceParam;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public interface TechDeviceParamService {

    /**
     * 查询所有
     *
     * @return
     */
    List<TechDeviceParam> getAllTechDeviceParam(HttpServletRequest request, Integer techDeviceTypeId, Integer techDeviceParamTypeId, String searchTechDeviceParamName);

    /**
     * 解析上传的参数文件
     *
     * @param file
     * @return
     */
    Result analysisTechDeviceParamExcel(MultipartFile file);

    /**
     * 删除
     *
     * @param techDeviceParamId
     * @return
     */
    Result deleteById(Integer techDeviceParamId);

    /**
     * 新增
     *
     * @param techDeviceParam
     * @return
     */
    Boolean addPcbaDeviceParam(TechDeviceParam techDeviceParam);

    /**
     * 更新
     *
     * @param techDeviceParam
     * @return
     */
    Boolean updatePcbaDeviceParam(TechDeviceParam techDeviceParam);

    /**
     * 新增或者更新
     *
     * @param techDeviceParam
     * @param mode
     * @return
     */
    Result addOrUpdateTechDeviceParam(TechDeviceParam techDeviceParam, String mode);

    /**
     * 修改参数的 actualEqualDeclare 值
     *
     * @param techDeviceParamId
     * @return
     */
    Result changeActualEqualDeclare(Integer techDeviceParamId);

    /**
     * 导出数据excel
     *
     * @return
     */
    Result exportTechDeviceParamExcel();

    /**
     * 根据key查询
     *
     * @param techDeviceParamKey
     * @return
     */
    Result getTechDeviceParamByKey(String techDeviceParamKey);
}
